package cn.cyty.midway.financial.po;

import java.util.List;

import cn.cyty.midway.card.po.Card;
import cn.cyty.midway.user.po.Member;

import com.tuweisoft.tt.potts.pump.oo.annotion.Entity;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.Primarykey;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.Item;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.choose.PSet;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.num.Money;
import com.tuweisoft.tt.potts.pump.oo.annotion.field.text.Text;
import com.tuweisoft.tt.potts.pump.oo.runtime.PumpObject;

@Entity(id="T_FINANCIAL", title="财务信息", dataField="id")
public class Financial implements PumpObject {

	private static final long serialVersionUID = -7194022080200276066L;

	@Text(id="FINANCIAL_ID", title="编号", minLength=64, required=true, unique=true)
	@Primarykey(increment=true)
	private String id;
	
	@Item(id="FINANCIAL_MEMBER", title="会员")
	private Member member;
	
	@PSet(itemType = Card.class , title="卡卷", manyToMany = false)
	private List<Card> cards;
	
	@Money(id="FINANCIAL_BALANCE", title="余额", required=true)
	private float balance;
	
	@Text(id="FINANCIAL_BALANCEMD5", title="余额加密", minLength=555)
	private String balancemd5;
	
	@Item(id="FINANCIAL_STATE", title="状态")
	private FinancialState state;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Member getMember() {
		return member;
	}

	public void setMember(Member member) {
		this.member = member;
	}

	public List<Card> getCards() {
		return cards;
	}

	public void setCards(List<Card> cards) {
		this.cards = cards;
	}

	public float getBalance() {
		return balance;
	}

	public void setBalance(float balance) {
		this.balance = balance;
	}

	public String getBalancemd5() {
		return balancemd5;
	}

	public void setBalancemd5(String balancemd5) {
		this.balancemd5 = balancemd5;
	}

	public FinancialState getState() {
		return state;
	}

	public void setState(FinancialState state) {
		this.state = state;
	}
	
	
}
